//
//  MEUtil.h
//  MapEditor
//
//  Created by Eric on 3/16/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface MEUtil : NSObject
+(BOOL) isInPolygon:(NSArray*) points point:(CGPoint) p;
+(BOOL) isClockWise:(NSArray*) ps;
+(CGFloat)distance:(CGPoint)p1 p2:(CGPoint)p2 p3:(CGPoint)p3;
+(CGPoint)rotate:(CGPoint)p angle:(CGFloat)angle;
+(CGFloat)angle:(CGPoint)cen first:(CGPoint)first second:(CGPoint) second;

+(NSString*)pointToStringIPhone:(CGPoint)p;
+(NSString*)pointToStringIPad:(CGPoint)p;

+(NSImage*)resizeImage:(NSImage*)image scale:(CGFloat)scale;
+(NSData*)imageToData:(NSImage*)image ext:(NSString*)ext;
@end
